package edu.whut.mall.admin.service;

import edu.whut.mall.admin.domain.InstitutionParams;
import edu.whut.mall.admin.domain.UserParams;
import edu.whut.mall.admin.vo.UserVo;
import edu.whut.mall.common.api.CommonPage;
import edu.whut.mall.model.Institution;

import java.util.List;

/**
 * @program: d9lab-mall
 * @description: 商家入驻服务类
 * @author: Wayne
 * @create: 2020-04-27 14:20
 **/
public interface IInstitutionService {
    /**
     * 新增一个机构入驻
     * @param institutionParams
     * @return
     */
    int insertOneInstitution(InstitutionParams institutionParams);

    /**
     * 为机构分配管理员
     * @param institutionId
     * @param regIp
     * @param userParams
     * @return
     */
    int assignAdmin2Institution(Long institutionId,String regIp,UserParams userParams);

    /**
     * 更新某个机构的信息
     * @param institutionParams
     * @return
     */
    int updateOneInstitution(InstitutionParams institutionParams);


    /**
     * 根据机构id获取该机构管理员信息
      * @param institutionId
     * @return
     */
    List<UserVo> listUserVosByInstitutionId(Long institutionId);

    /**
     * 列出所有机构
     * @param pageNum
     * @param size
     * @return
     */
    CommonPage<Institution> listInstitutionVos(Integer pageNum, Integer size);
}
